//
//  discoverTopCell.m
//  Focus
//
//  Created by xwc on 14-11-4.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "discoverTopCell.h"
#import "UIImageView+WebCache.h"

@implementation discoverTopCell

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        UIImageView *topImageView = [[UIImageView alloc] init];
        self.topImageView = topImageView;
        [topImageView release];
        [self.contentView addSubview:self.topImageView];
        [_topImageView release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.topImageView.frame = self.contentView.bounds;
}

- (void)setDiscoverModel:(discoverTitleModel *)discoverModel
{
    if (_discoverModel != nil) {
        [_discoverModel release];
        _discoverModel = [discoverModel retain];
    }
    self.topImageView.frame = self.contentView.bounds;
    [self.topImageView sd_setImageWithURL:[NSURL URLWithString:discoverModel.topImageStr]];
}


/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect
 {
 // Drawing code
 }
 */

@end
